import $service from '../../../../service.js';
const app = getApp();
Page({
    data:{
       doctorInfo:{}
    },
    onShow(){
        this.getDoctorInfo();
    },


    getDoctorInfo() {
        app.http.getDoctorInfo().then(res => {
            console.log(res)
            this.setData({
                doctorInfo: res.data
            })
        }).catch(err => {
            $service.showToast(err.msg)
        })
    },
    previewImage: function(e) { //图片放大
        var index = e.currentTarget.dataset.index;
        var src = e.currentTarget.dataset.src;
        var all = [];
        all.push(src);
        all.forEach(item => {
            item = item.replace(/https/, 'http')
        })
        wx.previewImage({
            urls: all
        })
    },
})